/**
 * Created by ljf on 2018/4/19.
 * FlatList 分割线
 */
import React, {Component} from 'react';
import {StyleSheet, View,
    PixelRatio} from 'react-native';
import PropTypes from "prop-types";


export default class ListSeparator extends Component {

    static propTypes = {
        height: PropTypes.number,
        backgroundColor: PropTypes.string,
        marginHorizontal:PropTypes.number,
    }
    static defaultProps = {
        height: 1 / PixelRatio.get(),
        backgroundColor: "#eeeeee",
        marginHorizontal:0,
    }

    constructor(props) {
        super(props);
    }

    render() {
        return (
            <View style={[styles.separator, {
                height: this.props.height,
                backgroundColor:this.props.backgroundColor,
                marginHorizontal:this.props.marginHorizontal
            }]}></View>
        );
    }
}

const styles = StyleSheet.create(
    {
        separator: {
            height: 1 / PixelRatio.get(),
            backgroundColor: "#eeeeee",
        },

    });


